/**
 * Our City
 * Cmpe 352 Spring '13 Project
 */

/**
 * Main class for execution.
 */
public class Main {

        /**
         * Main execution point of the program.
         * 
         * @param args Command-line arguments
         */
        public static void main(String[] args) {
                // Call your own methods from here:
        		System.out.println(hail("Ahmet"));
        		System.out.println(good_day(8));
        		System.out.println(power(12));
        		System.out.println(fibo_Burak(10));
        		System.out.println(findMax(10, 11));
                System.out.println(printGrade(96.4));
                System.out.println(poem());
                System.out.println(hello());
        }
        
        /**
         *
         * @author Ismail Altuntas
         */
        public static String hello() {
        	String str = "Hello World!";
        	return str;
        }
        
        /**
         * Hails given name in four languages: English, Turkish, French
         * and Esperanto in order.
         * 
         * @param name The name to be hailed.
         * @author Mehmet Emre
         */
        public static String hail(String name) {
        	String str = "Hello, "+name+"!\nMerhaba, "+name+"!\nSalut, "+name+"!\nSaluton, "+name+"!\n";
            return str;
        }
        /**
         * Says good day according to the time value.
         * 
         * @param time integer time value between 0<=time<24
         * @author Pinar Kavak
         */
        public static String good_day(int time) {
        	String str = "";
            if(time>3&&time<=12)
            	str = "Good morning!";
            else if(time>12&&time<=16)
            	str = "Good afternoon!";
            else if(time>16&&time<22)
            	str = "Good evening!";
            else if((time>=0&&time<=3)||(time>22&&time<24))
            	str = "Good night!";
            else
            	str = "This is not a valid time value!";
            return str;
        }
        
        /**
         * Gives the 2nd power of a given integer
         *
         *@param val Integer value to be processed
         *@author Ali Osman Bayrak
         */
        public static int power(int val) {
            return val*val;
        } 
        
        /**
         * Prints the letter grade of the given score
         *
         *@param Double score score to be graded
         *@author Mehmet Orkun Uckunlar
         */
        public static String printGrade(double score) {
        	String str = "";
        	if (score >= 90.0) {
        		str = "A";
        	}
        	else if (score >= 80.0) {
        		str = "B";
        	}
        	else if (score >= 70.0) {
        		str = "C";
        	}
        	else if (score >= 60.0) {
        		str = "D";
        	}
        	else {
        		str = "F";
        	}
        	return str;
        }
        
        /**
         * Gives the nth number in Fibonacci series.
         * 
         * @param n nth number of the series.
         * @author Burak Sivrikaya
         */
        public static int fibo_Burak(int n){
                int result=0;
                if(n==1)
                        result = 1;
                else if(n==2)
                        result = 1;
                else{
                        int f1= 1; 
                        int f2= 1;
                        for(int i=3; i<=n;i++){
                                int temp = f1;
                                f1=f2;
                                f2=f1+temp;
                        }
                        result = f2;
                }
                return result;
        }
        
        
        /**
         * Gives the max between two numbers
         * 
         * @param num1 first number
         * @param num2 second number
         * @author Bahar Hilal Yuksel
         */
           public static int findMax(int num1, int num2) {
              int result;
              if (num1 > num2)
                 result = num1;
              else
                 result = num2;

              return result;
           }
           
           /**
                * It writes a poem of M.Akif Ersoy
                *
                *
                *@author Hakan Canoz
                */
                public static String poem()
                {
                        return "              RESSAM HAKLI\n\n" +
                                                           "Bir zaman vardÃ„Â± ya tarih-i mukaddes modasÃ„Â±... \n" +
                                                           "Yeni yaptÃ„Â±rdÃ„Â±Ã„ÂŸÃ„Â± kÃƒÂ¶Ã…ÂŸkÃƒÂ¼n bÃƒÂ¼yÃƒÂ¼cek bir odasÃ„Â± \n" + 
                                                           "Mutfakta eski resimler ile hep sÃƒÂ¼slensin \n" + 
                                                           "Diye ressam aratÃ„Â±r hayli zaman bir zengin. \n" + 
                                                           "Biri peyda olarak 'Ben yaparÃ„Â±m' der, kolunu \n" + 
                                                           "SÃ„Â±vayÃ„Â±p akÃ…ÂŸama varmaz, sekiz arÃ…ÂŸÃ„Â±n salonu \n" + 
                                                           "SÃ„Â±var ama ne sÃ„Â±var...Sahibi der: \n" + 
                                                           "-Usta bu ne? \n" + 
                                                       "KÃ„Â±pkÃ„Â±zÃ„Â±l bir boya ÃƒÂ§ektin odanÃ„Â±n her yerine! .. \n" + 
                                                           "-Bu resim, askeri basmakta iken Firavun' un \n" + 
                                                       "KÃ„Â±zÃ„Â±l Deniz yarÃ„Â±lÃ„Â±p geÃƒÂ§mesidir Musa' nÃ„Â±n \n" + 
                                                       "-Hani Musa, be adam? \n" + 
                                                       "-ÃƒÂ‡Ã„Â±kmÃ„Â±Ã…ÂŸ efendim karaya \n" + 
                                                       "-Firavun nerde? \n" + 
                                                       "-BoÃ„ÂŸulmuÃ…ÂŸ. \n" + 
                                                       "-Ya bu kan rengi boya? \n" + 
                                                       "-KÃ„Â±zÃ„Â±l Deniz, a efendim yeÃ…ÂŸil olmaz ya bu da! \n" + 
                                                       "-ÃƒÂ‡ok gÃƒÂ¼zel levha imiÃ…ÂŸ, doÃ„ÂŸrusu Ã…ÂŸenlendi oda! .. \n";
         }

}
